(0) Obligation:

Clauses:

p(cons(X, nil)).
p(cons(s(s(X)), cons(Y, Xs))) :- ','(p(cons(X, cons(Y, Xs))), p(cons(s(s(s(s(Y)))), Xs))).
p(cons(0, Xs)) :- p(Xs).

Query: p(g)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

pA(cons(s(s(s(s(X1)))), cons(X2, X3))) :- pA(cons(X1, cons(X2, X3))).
pA(cons(s(s(s(s(X1)))), cons(X2, X3))) :- ','(pcA(cons(X1, cons(X2, X3))), pA(cons(s(s(s(s(X2)))), X3))).
pA(cons(s(s(s(s(X1)))), cons(X2, X3))) :- ','(pcA(cons(X1, cons(X2, X3))), ','(pcA(cons(s(s(s(s(X2)))), X3)), pA(cons(s(s(s(s(X2)))), X3)))).
pA(cons(s(s(0)), cons(X1, X2))) :- pA(cons(X1, X2)).
pA(cons(s(s(0)), cons(X1, X2))) :- ','(pcA(cons(X1, X2)), pA(cons(s(s(s(s(X1)))), X2))).
pA(cons(0, cons(s(s(X1)), cons(X2, X3)))) :- pA(cons(X1, cons(X2, X3))).
pA(cons(0, cons(s(s(X1)), cons(X2, X3)))) :- ','(pcA(cons(X1, cons(X2, X3))), pA(cons(s(s(s(s(X2)))), X3))).
pA(cons(0, cons(0, X1))) :- pA(X1).

Clauses:

pcA(cons(X1, nil)).
pcA(cons(s(s(s(s(X1)))), cons(X2, X3))) :- ','(pcA(cons(X1, cons(X2, X3))), ','(pcA(cons(s(s(s(s(X2)))), X3)), pcA(cons(s(s(s(s(X2)))), X3)))).
pcA(cons(s(s(0)), cons(X1, X2))) :- ','(pcA(cons(X1, X2)), pcA(cons(s(s(s(s(X1)))), X2))).
pcA(cons(0, cons(X1, nil))).
pcA(cons(0, cons(s(s(X1)), cons(X2, X3)))) :- ','(pcA(cons(X1, cons(X2, X3))), pcA(cons(s(s(s(s(X2)))), X3))).
pcA(cons(0, cons(0, X1))) :- pcA(X1).

Afs:

pA(x1)  =  pA(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
pA_in: (b)
pcA_in: (b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U1_G(X1, X2, X3, pA_in_g(cons(X1, cons(X2, X3))))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U2_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U3_G(X1, X2, X3, pA_in_g(cons(s(s(s(s(X2)))), X3)))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → U6_G(X1, X2, pA_in_g(cons(X1, X2)))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → PA_IN_G(cons(X1, X2))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → U7_G(X1, X2, pcA_in_g(cons(X1, X2)))
U7_G(X1, X2, pcA_out_g(cons(X1, X2))) → U8_G(X1, X2, pA_in_g(cons(s(s(s(s(X1)))), X2)))
U7_G(X1, X2, pcA_out_g(cons(X1, X2))) → PA_IN_G(cons(s(s(s(s(X1)))), X2))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U9_G(X1, X2, X3, pA_in_g(cons(X1, cons(X2, X3))))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U10_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U10_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U11_G(X1, X2, X3, pA_in_g(cons(s(s(s(s(X2)))), X3)))
U10_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(0, cons(0, X1))) → U12_G(X1, pA_in_g(X1))
PA_IN_G(cons(0, cons(0, X1))) → PA_IN_G(X1)
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U4_G(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U5_G(X1, X2, X3, pA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

Pi is empty.
We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U1_G(X1, X2, X3, pA_in_g(cons(X1, cons(X2, X3))))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U2_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U3_G(X1, X2, X3, pA_in_g(cons(s(s(s(s(X2)))), X3)))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → U6_G(X1, X2, pA_in_g(cons(X1, X2)))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → PA_IN_G(cons(X1, X2))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → U7_G(X1, X2, pcA_in_g(cons(X1, X2)))
U7_G(X1, X2, pcA_out_g(cons(X1, X2))) → U8_G(X1, X2, pA_in_g(cons(s(s(s(s(X1)))), X2)))
U7_G(X1, X2, pcA_out_g(cons(X1, X2))) → PA_IN_G(cons(s(s(s(s(X1)))), X2))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U9_G(X1, X2, X3, pA_in_g(cons(X1, cons(X2, X3))))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U10_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U10_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U11_G(X1, X2, X3, pA_in_g(cons(s(s(s(s(X2)))), X3)))
U10_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(0, cons(0, X1))) → U12_G(X1, pA_in_g(X1))
PA_IN_G(cons(0, cons(0, X1))) → PA_IN_G(X1)
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U4_G(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U5_G(X1, X2, X3, pA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 8 less nodes.

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U2_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → PA_IN_G(cons(X1, X2))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → U7_G(X1, X2, pcA_in_g(cons(X1, X2)))
U7_G(X1, X2, pcA_out_g(cons(X1, X2))) → PA_IN_G(cons(s(s(s(s(X1)))), X2))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U10_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U10_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(0, cons(0, X1))) → PA_IN_G(X1)
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U4_G(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(7) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U2_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → PA_IN_G(cons(X1, X2))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → U7_G(X1, X2, pcA_in_g(cons(X1, X2)))
U7_G(X1, X2, pcA_out_g(cons(X1, X2))) → PA_IN_G(cons(s(s(s(s(X1)))), X2))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U10_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U10_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(0, cons(0, X1))) → PA_IN_G(X1)
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U4_G(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

The set Q consists of the following terms:

pcA_in_g(x0)
U21_g(x0, x1)
U19_g(x0, x1, x2, x3)
U20_g(x0, x1, x2, x3)
U17_g(x0, x1, x2)
U18_g(x0, x1, x2)
U14_g(x0, x1, x2, x3)
U15_g(x0, x1, x2, x3)
U16_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(9) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


PA_IN_G(cons(s(s(0)), cons(X1, X2))) → PA_IN_G(cons(X1, X2))
PA_IN_G(cons(s(s(0)), cons(X1, X2))) → U7_G(X1, X2, pcA_in_g(cons(X1, X2)))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → PA_IN_G(cons(X1, cons(X2, X3)))
PA_IN_G(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U10_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
PA_IN_G(cons(0, cons(0, X1))) → PA_IN_G(X1)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 1   
POL(PA_IN_G(x1)) = x1   
POL(U10_G(x1, x2, x3, x4)) = x2 + x3   
POL(U14_g(x1, x2, x3, x4)) = 0   
POL(U15_g(x1, x2, x3, x4)) = 0   
POL(U16_g(x1, x2, x3, x4)) = 0   
POL(U17_g(x1, x2, x3)) = 0   
POL(U18_g(x1, x2, x3)) = 0   
POL(U19_g(x1, x2, x3, x4)) = 0   
POL(U20_g(x1, x2, x3, x4)) = 0   
POL(U21_g(x1, x2)) = 0   
POL(U2_G(x1, x2, x3, x4)) = x2 + x3   
POL(U4_G(x1, x2, x3, x4)) = x2 + x3   
POL(U7_G(x1, x2, x3)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(nil) = 1   
POL(pcA_in_g(x1)) = 1 + x1   
POL(pcA_out_g(x1)) = 1   
POL(s(x1)) = x1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:
none

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U2_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))
U7_G(X1, X2, pcA_out_g(cons(X1, X2))) → PA_IN_G(cons(s(s(s(s(X1)))), X2))
U10_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U4_G(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

The set Q consists of the following terms:

pcA_in_g(x0)
U21_g(x0, x1)
U19_g(x0, x1, x2, x3)
U20_g(x0, x1, x2, x3)
U17_g(x0, x1, x2)
U18_g(x0, x1, x2)
U14_g(x0, x1, x2, x3)
U15_g(x0, x1, x2, x3)
U16_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(11) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U2_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U4_G(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

The set Q consists of the following terms:

pcA_in_g(x0)
U21_g(x0, x1)
U19_g(x0, x1, x2, x3)
U20_g(x0, x1, x2, x3)
U17_g(x0, x1, x2)
U18_g(x0, x1, x2)
U14_g(x0, x1, x2, x3)
U15_g(x0, x1, x2, x3)
U16_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → U2_G(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(PA_IN_G(x1)) = x1   
POL(U14_g(x1, x2, x3, x4)) = 0   
POL(U15_g(x1, x2, x3, x4)) = 0   
POL(U16_g(x1, x2, x3, x4)) = 0   
POL(U17_g(x1, x2, x3)) = 0   
POL(U18_g(x1, x2, x3)) = 0   
POL(U19_g(x1, x2, x3, x4)) = 0   
POL(U20_g(x1, x2, x3, x4)) = 0   
POL(U21_g(x1, x2)) = 0   
POL(U2_G(x1, x2, x3, x4)) = 1 + x3   
POL(U4_G(x1, x2, x3, x4)) = 1 + x3   
POL(cons(x1, x2)) = 1 + x2   
POL(nil) = 0   
POL(pcA_in_g(x1)) = x1   
POL(pcA_out_g(x1)) = 0   
POL(s(x1)) = 0   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:
none

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
U2_G(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U4_G(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U4_G(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → PA_IN_G(cons(s(s(s(s(X2)))), X3))
PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

The set Q consists of the following terms:

pcA_in_g(x0)
U21_g(x0, x1)
U19_g(x0, x1, x2, x3)
U20_g(x0, x1, x2, x3)
U17_g(x0, x1, x2)
U18_g(x0, x1, x2)
U14_g(x0, x1, x2, x3)
U15_g(x0, x1, x2, x3)
U16_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(15) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 3 less nodes.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))

The TRS R consists of the following rules:

pcA_in_g(cons(X1, nil)) → pcA_out_g(cons(X1, nil))
pcA_in_g(cons(s(s(s(s(X1)))), cons(X2, X3))) → U14_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(s(s(0)), cons(X1, X2))) → U17_g(X1, X2, pcA_in_g(cons(X1, X2)))
pcA_in_g(cons(0, cons(X1, nil))) → pcA_out_g(cons(0, cons(X1, nil)))
pcA_in_g(cons(0, cons(s(s(X1)), cons(X2, X3)))) → U19_g(X1, X2, X3, pcA_in_g(cons(X1, cons(X2, X3))))
pcA_in_g(cons(0, cons(0, X1))) → U21_g(X1, pcA_in_g(X1))
U21_g(X1, pcA_out_g(X1)) → pcA_out_g(cons(0, cons(0, X1)))
U19_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U20_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U20_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(0, cons(s(s(X1)), cons(X2, X3))))
U17_g(X1, X2, pcA_out_g(cons(X1, X2))) → U18_g(X1, X2, pcA_in_g(cons(s(s(s(s(X1)))), X2)))
U18_g(X1, X2, pcA_out_g(cons(s(s(s(s(X1)))), X2))) → pcA_out_g(cons(s(s(0)), cons(X1, X2)))
U14_g(X1, X2, X3, pcA_out_g(cons(X1, cons(X2, X3)))) → U15_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U15_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → U16_g(X1, X2, X3, pcA_in_g(cons(s(s(s(s(X2)))), X3)))
U16_g(X1, X2, X3, pcA_out_g(cons(s(s(s(s(X2)))), X3))) → pcA_out_g(cons(s(s(s(s(X1)))), cons(X2, X3)))

The set Q consists of the following terms:

pcA_in_g(x0)
U21_g(x0, x1)
U19_g(x0, x1, x2, x3)
U20_g(x0, x1, x2, x3)
U17_g(x0, x1, x2)
U18_g(x0, x1, x2)
U14_g(x0, x1, x2, x3)
U15_g(x0, x1, x2, x3)
U16_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(17) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))

R is empty.
The set Q consists of the following terms:

pcA_in_g(x0)
U21_g(x0, x1)
U19_g(x0, x1, x2, x3)
U20_g(x0, x1, x2, x3)
U17_g(x0, x1, x2)
U18_g(x0, x1, x2)
U14_g(x0, x1, x2, x3)
U15_g(x0, x1, x2, x3)
U16_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(19) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

pcA_in_g(x0)
U21_g(x0, x1)
U19_g(x0, x1, x2, x3)
U20_g(x0, x1, x2, x3)
U17_g(x0, x1, x2)
U18_g(x0, x1, x2)
U14_g(x0, x1, x2, x3)
U15_g(x0, x1, x2, x3)
U16_g(x0, x1, x2, x3)

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

PA_IN_G(cons(s(s(s(s(X1)))), cons(X2, X3))) → PA_IN_G(cons(X1, cons(X2, X3)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(PA_IN_G(x1)) = x1   
POL(cons(x1, x2)) = x1 + x2   
POL(s(x1)) = x1   

(22) Obligation:

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(23) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(24) YES